package com.dgd.test.demo.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @program: 726
 * @description:
 * @author: Jaime
 * @create: 2021-07-31 19:31
 **/
@Component
@Aspect
public class myAspect {
    @Around("execution(* com.dgd.test.demo.controller.HelloControll.*(..))")
    public Object myAspetTest(ProceedingJoinPoint joinPoint) throws Throwable {
        System.out.println("方法开始时间是:"+new Date());
        Object o = joinPoint.proceed();
        System.out.println("方法结束时间是:"+new Date()) ;
        return o;
    }
}
